<template>
	<view style="padding-bottom: 100rpx;">
		<u-swiper :list="dataAll.images_text" height="260" indicator circular radius="0"></u-swiper>
		<view class="mainpadding">
			<view class="mainpadding_top ffffff radius">
				<view class="xiaohei fonweight bigtext">{{dataAll.name}}</view>
				<view class="margin_top" v-html="dataAll.content">
					
				</view>
			</view>
			<!-- <view class="flexleft margin_top">
				<view class="ggline margin_right2"></view>
				<view class=" titletext fonweight zhonghei">推荐套餐</view>
			</view>
			<view class="mainpadding_top ffffff radius" v-for="item in list" :key="item.id">
				<view class="xiaohei ershiba titletext xiahuaxian" style="padding-bottom: 20rpx;">{{item.name}}</view>
				<view class="flexbetween margin_top2">
					<view class="xiaohong fonweight ershil">￥{{item.price}}</view>
					<view class="listlanbtn strongtext margin_left3 xiaobai" @click="buytc(item)">立即购买</view>
				</view>
			</view> -->
		</view>
		<view class="gudingdb ffffff flexbetween mainpadding2s">
			<view class="bigtext fonweight xiaolan"><text class="smalltext">￥</text>{{dataAll.price}}</view>
			<view class="buybtn" @click="jumpdetail('/pages/index/luxianxq?id=',listid)">立即购买</view>
		</view>
	</view>
</template>

<script>
	const httpRequest = require("@/common/httpRequest.js")
	export default {
		data() {
			return {
				listid:"",
				dataAll:{},
				list:[]
			}
		},
		onLoad(options) {
			this.listid = options.id
			this.getdetail()
			// this.gettaocan()
		},
		methods: {
			getdetail(){
				httpRequest.request('/api/Travelcl/touristDetail','GET',{
					id:this.listid
				}).then(res => {
					this.dataAll = res.data
				})
			},
			gettaocan(){
				httpRequest.request('/api/Travelcl/touristTcIndex','GET',{
				}).then(res => {
					this.list = res.data
				})
				
			},
			jumpdetail(url,id) {
				if (!httpRequest.checkIsLogin()) {
					uni.navigateTo({
						url: "/pages/login/login"
					})
					return false
				}
				uni.navigateTo({
					url:url+id
				})
			},
			buytc(item){
				if (!httpRequest.checkIsLogin()) {
					uni.navigateTo({
						url: "/pages/login/login"
					})
					return false
				}
				uni.navigateTo({
					url:"/pages/index/taocanzf?tourist_id="+this.listid+"&tourist_tc_id="+item.id+"&pay_price="+item.price
				})
			},
		}
	}
</script>

<style>
	
	.buybtn{
		border-radius: 15rpx;
		background-color: #3478f5;
		padding: 15rpx 30rpx;
		color: #fff;
		font-size: 28rpx;
	}
</style>